\(\int \frac {1}{\sqrt {2-\frac {b}{x^2}} x^2} \, dx\) [1929]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 20 \[ \int \frac {1}{\sqrt {2-\frac {b}{x^2}} x^2} \, dx=-\frac {\csc ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {b}}\right )}{\sqrt {b}} \]

[Out]

-arccsc(x*2^(1/2)/b^(1/2))/b^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {342, 222} \[ \int \frac {1}{\sqrt {2-\frac {b}{x^2}} x^2} \, dx=-\frac {\csc ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {b}}\right )}{\sqrt {b}} \]

[In]

Int[1/(Sqrt[2 - b/x^2]*x^2),x]

[Out]

-(ArcCsc[(Sqrt[2]*x)/Sqrt[b]]/Sqrt[b])

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 342

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Subst[Int[(a + b/x^n)^p/x^(m + 2), x], x, 1/x] /;
FreeQ[{a, b, p}, x] && ILtQ[n, 0] && IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {1}{\sqrt {2-b x^2}} \, dx,x,\frac {1}{x}\right ) \\ & = -\frac {\csc ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {b}}\right )}{\sqrt {b}} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(54\) vs. \(2(20)=40\).

Time = 0.04 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.70 \[ \int \frac {1}{\sqrt {2-\frac {b}{x^2}} x^2} \, dx=\frac {\sqrt {-b+2 x^2} \arctan \left (\frac {\sqrt {-b+2 x^2}}{\sqrt {b}}\right )}{\sqrt {b} \sqrt {2-\frac {b}{x^2}} x} \]

[In]

Integrate[1/(Sqrt[2 - b/x^2]*x^2),x]

[Out]

(Sqrt[-b + 2*x^2]*ArcTan[Sqrt[-b + 2*x^2]/Sqrt[b]])/(Sqrt[b]*Sqrt[2 - b/x^2]*x)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(62\) vs. \(2(14)=28\).

Time = 0.04 (sec) , antiderivative size = 63, normalized size of antiderivative = 3.15

method result size
default \(-\frac {\sqrt {2 x^{2}-b}\, \ln \left (\frac {-2 b +2 \sqrt {-b}\, \sqrt {2 x^{2}-b}}{x}\right )}{\sqrt {-\frac {-2 x^{2}+b}{x^{2}}}\, x \sqrt {-b}}\) \(63\)

[In]

int(1/x^2/(2-b/x^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/(-(-2*x^2+b)/x^2)^(1/2)/x*(2*x^2-b)^(1/2)/(-b)^(1/2)*ln(2*((-b)^(1/2)*(2*x^2-b)^(1/2)-b)/x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 37 vs. \(2 (14) = 28\).

Time = 0.28 (sec) , antiderivative size = 84, normalized size of antiderivative = 4.20 \[ \int \frac {1}{\sqrt {2-\frac {b}{x^2}} x^2} \, dx=\left [-\frac {\sqrt {-b} \log \left (-\frac {x^{2} - \sqrt {-b} x \sqrt {\frac {2 \, x^{2} - b}{x^{2}}} - b}{x^{2}}\right )}{2 \, b}, -\frac {\arctan \left (\frac {\sqrt {b} x \sqrt {\frac {2 \, x^{2} - b}{x^{2}}}}{2 \, x^{2} - b}\right )}{\sqrt {b}}\right ] \]

[In]

integrate(1/x^2/(2-b/x^2)^(1/2),x, algorithm="fricas")

[Out]

[-1/2*sqrt(-b)*log(-(x^2 - sqrt(-b)*x*sqrt((2*x^2 - b)/x^2) - b)/x^2)/b, -arctan(sqrt(b)*x*sqrt((2*x^2 - b)/x^
2)/(2*x^2 - b))/sqrt(b)]

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.60 (sec) , antiderivative size = 48, normalized size of antiderivative = 2.40 \[ \int \frac {1}{\sqrt {2-\frac {b}{x^2}} x^2} \, dx=\begin {cases} \frac {i \operatorname {acosh}{\left (\frac {\sqrt {2} \sqrt {b}}{2 x} \right )}}{\sqrt {b}} & \text {for}\: \left |{\frac {b}{x^{2}}}\right | > 2 \\- \frac {\operatorname {asin}{\left (\frac {\sqrt {2} \sqrt {b}}{2 x} \right )}}{\sqrt {b}} & \text {otherwise} \end {cases} \]

[In]

integrate(1/x**2/(2-b/x**2)**(1/2),x)

[Out]

Piecewise((I*acosh(sqrt(2)*sqrt(b)/(2*x))/sqrt(b), Abs(b/x**2) > 2), (-asin(sqrt(2)*sqrt(b)/(2*x))/sqrt(b), Tr
ue))

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {2-\frac {b}{x^2}} x^2} \, dx=\frac {\arctan \left (\frac {x \sqrt {-\frac {b}{x^{2}} + 2}}{\sqrt {b}}\right )}{\sqrt {b}} \]

[In]

integrate(1/x^2/(2-b/x^2)^(1/2),x, algorithm="maxima")

[Out]

arctan(x*sqrt(-b/x^2 + 2)/sqrt(b))/sqrt(b)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 42 vs. \(2 (14) = 28\).

Time = 0.29 (sec) , antiderivative size = 42, normalized size of antiderivative = 2.10 \[ \int \frac {1}{\sqrt {2-\frac {b}{x^2}} x^2} \, dx=-\frac {\arctan \left (\frac {\sqrt {-b}}{\sqrt {b}}\right ) \mathrm {sgn}\left (x\right )}{\sqrt {b}} + \frac {\arctan \left (\frac {\sqrt {2 \, x^{2} - b}}{\sqrt {b}}\right )}{\sqrt {b} \mathrm {sgn}\left (x\right )} \]

[In]

integrate(1/x^2/(2-b/x^2)^(1/2),x, algorithm="giac")

[Out]

-arctan(sqrt(-b)/sqrt(b))*sgn(x)/sqrt(b) + arctan(sqrt(2*x^2 - b)/sqrt(b))/(sqrt(b)*sgn(x))

Mupad [B] (verification not implemented)

Time = 6.10 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.05 \[ \int \frac {1}{\sqrt {2-\frac {b}{x^2}} x^2} \, dx=-\frac {\mathrm {asinh}\left (\frac {\sqrt {2}\,\sqrt {-b}}{2\,x}\right )}{\sqrt {-b}} \]

[In]

int(1/(x^2*(2 - b/x^2)^(1/2)),x)

[Out]

-asinh((2^(1/2)*(-b)^(1/2))/(2*x))/(-b)^(1/2)